package com.ofwiki.demo.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;


/**
 * (Jobs)实体类
 *
 * @author huang.js
 * @version 1.0
 * @date 2023-03-18
 */
@Data
@Accessors(chain = true)
@TableName(value = "tb_jobs")
public class Jobs implements Serializable {
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;
    //@ApiModelProperty(value = "服务名称", required = true)
    private String serviceName;
    //@ApiModelProperty(value = "任务名称", required = true)
    private String name;
    //@ApiModelProperty(value = "任务表述")
    private String description;
    //@ApiModelProperty(value = "cron表达式")
    private String cronExpression;
    //@ApiModelProperty(value = "时区")
    private String timeZone;
    //@ApiModelProperty(value = "是否持久化任务执行结果日志:true->持久化;false->不持久化;", required = true)
    private Boolean logDurable;
    //@ApiModelProperty(value = "是否并发执行:true->所用节点执行;false->当节点运行;", required = true)
    private Boolean concurrent;
    //@ApiModelProperty(value = "任务执行参数")
    private String param;
    //@ApiModelProperty(value = "是否启用", required = true)
    private Boolean status;
    //@ApiModelProperty(value = "是否挂载", required = true)
    private Boolean mount;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
    private LocalDateTime createTime;
    @JsonIgnore
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
    private LocalDateTime updateTime;
}
